package cqut;

public class Test {
    public static void say(LAnimal animal){
        animal.say();
    }

    public static void main(String[] args) {
        Test.say(new Cat());
        Test.say(new Dog());
        animal animal=new animal();
        System.out.println(animal.a);
    }
}
interface LAnimal{
    void say();
}
class Dog extends animal implements LAnimal {
    @Override
    public void say() {
        System.out.println("汪汪汪");
    }
}
class Cat extends animal implements LAnimal {

    @Override
    public void say() {
        System.out.println("喵喵喵");
    }
}
